package guoanmaker.provider.business.repository;

import java.util.List;
import java.util.Optional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;



import guoanmaker.provider.business.model.ToperatorCity;

public interface ToperatorCityRepository extends JpaRepository<ToperatorCity, String>, JpaSpecificationExecutor<ToperatorCity> {
	  	@Query("select u from ToperatorCity u where u.status=:status group by provinceId")
	    public List<ToperatorCity> findByStatus(@Param("status") Integer status);
	  	
	  	
	  	//@Query("select u from ToperatorCity u where u.status=0 and u.provinceId=:proCode")
	  	@Query("select u from ToperatorCity u where   u.provinceId=:proCode")
	    public List<ToperatorCity> findByProviceCode(@Param("proCode") String proCode);
}
